<div class="modal-body">
	<div class="lead">
		<h3>选择所属组织</h3>
	</div>

<div style="overflow: auto;height: 300px">
	<div style="background-color: #F3F3F3;margin: 1px;">
		<ul style="list-style: none;">
			<li data-ng-repeat="org in orgs | filter:query"
				data-ng-include="'treeitem.html'"></li>
			<li></li>
		</ul>
	</div>
</div>

	<div>已选组织：{{selectedOrg.orgName}}</div>
	
	<div class="form-group">
		<div class="col-sm-4" style="margin-left: -18px;margin-top: 20px">
			<button type="submit" class="btn btn-default" ng-click="submit()">保存</button>
			<button class="btn btn-default" ng-click="cancel()">取消</button>
		</div>
	</div>
	<div style="height: 30px"></div>
</div>

<script type="text/ng-template" id="treeitem.html">
		<span class="caret" ng-if="org.subs.length > 0" ng-click="openTree(org)" style="width: 9px;height: 8px"></span>
		<a href ng-click="record(org)" ng-dblclick="edit(org)" ng-class="{black: selectedOrg == org}" ng-if="!isEdit[org.orgId]">{{ org.orgName }}</a>
        <ul style="list-style: none;" ng-if="org.isSubsShow">
            <li data-ng-repeat="org in org.subs" data-ng-include="'treeitem.html'"></li>
        </ul>
</script>

